package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OaPaymentAccountsMapper;
import com.ruoyi.system.domain.OaPaymentAccounts;
import com.ruoyi.system.service.IOaPaymentAccountsService;

/**
 * 支付账号Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-13
 */
@Service
public class OaPaymentAccountsServiceImpl implements IOaPaymentAccountsService 
{
    @Autowired
    private OaPaymentAccountsMapper oaPaymentAccountsMapper;

    /**
     * 查询支付账号
     * 
     * @param id 支付账号主键
     * @return 支付账号
     */
    @Override
    public OaPaymentAccounts selectOaPaymentAccountsById(Long id)
    {
        return oaPaymentAccountsMapper.selectOaPaymentAccountsById(id);
    }

    /**
     * 查询支付账号列表
     * 
     * @param oaPaymentAccounts 支付账号
     * @return 支付账号
     */
    @Override
    public List<OaPaymentAccounts> selectOaPaymentAccountsList(OaPaymentAccounts oaPaymentAccounts)
    {
        return oaPaymentAccountsMapper.selectOaPaymentAccountsList(oaPaymentAccounts);
    }

    /**
     * 新增支付账号
     * 
     * @param oaPaymentAccounts 支付账号
     * @return 结果
     */
    @Override
    public int insertOaPaymentAccounts(OaPaymentAccounts oaPaymentAccounts)
    {
        oaPaymentAccounts.setCreateTime(DateUtils.getNowDate());
        return oaPaymentAccountsMapper.insertOaPaymentAccounts(oaPaymentAccounts);
    }

    /**
     * 修改支付账号
     * 
     * @param oaPaymentAccounts 支付账号
     * @return 结果
     */
    @Override
    public int updateOaPaymentAccounts(OaPaymentAccounts oaPaymentAccounts)
    {
        return oaPaymentAccountsMapper.updateOaPaymentAccounts(oaPaymentAccounts);
    }

    /**
     * 批量删除支付账号
     * 
     * @param ids 需要删除的支付账号主键
     * @return 结果
     */
    @Override
    public int deleteOaPaymentAccountsByIds(Long[] ids)
    {
        return oaPaymentAccountsMapper.deleteOaPaymentAccountsByIds(ids);
    }

    /**
     * 删除支付账号信息
     * 
     * @param id 支付账号主键
     * @return 结果
     */
    @Override
    public int deleteOaPaymentAccountsById(Long id)
    {
        return oaPaymentAccountsMapper.deleteOaPaymentAccountsById(id);
    }
}
